import React, { PureComponent } from 'react'
import { AppWrapper, SectionWrapp } from './style'
import Home from './Home/index'

export default class App extends PureComponent {
  constructor() {
    super()
    this.state = {
      size: 30,
      color: 'yellow',
    }
  }

  render() {
    const { size } = this.state

    return (
      <AppWrapper>
        <SectionWrapp size={size}>
          <div className="title">我是标题</div>
          <div className="content">我是内容</div>
          <button onClick={(e) => this.changeColor()}>修改颜色</button>
        </SectionWrapp>

        <div className="footer">
          <p>免签申明</p>
          <p>版权申明</p>
        </div>

        <Home />
      </AppWrapper>
    )
  }

  changeColor() {
    this.setState({
      color: 'skyblue',
    })
  }
}
